package com.example.day2.zhibo;

import androidx.lifecycle.MutableLiveData;

import com.example.day2.entity.StartParam;
import com.example.day2.entity.StartResult;
import com.example.day2.entity.StopResult;
import com.example.day2.mvvm.base.BaseViewModel;

public class StartViewModel extends BaseViewModel<StartRepo> {
    protected MutableLiveData<StartResult> successStart = new MutableLiveData<>();
    protected MutableLiveData<String> failStart = new MutableLiveData<>();
    public void getStart(StartParam startParam){
        repo.getStart(startParam,successStart,failStart);
    }

    protected MutableLiveData<StopResult> successStop = new MutableLiveData<>();
    protected MutableLiveData<String> failStop = new MutableLiveData<>();
    public void getStop(){
        repo.getStop(successStop,failStop);
    }
    @Override
    public StartRepo createRepo() {
        return new StartRepo();
    }
}
